package com.battery.minapp.redis.lock;

/**
 * 这里获取redis的锁名称（也就是key）
 *
 * @author caoxu
 */
public class RedisKeyHelper {

    /**
     * 支付宝租借电池
     *
     * @param key
     * @return
     */
    public static String getAliBorrowKey(String key) {
        return RedisCommonLock.getLockKey("ali_borrow_lock_", key + "");
    }


    /**
     * 支付宝预授权
     *
     * @param key
     * @return
     */
    public static String getAliDoFreeKey(String key) {
        return RedisCommonLock.getLockKey("ali_dofree_lock_", key + "");
    }


    /**
     * 微信租借电池
     *
     * @param key
     * @return
     */
    public static String getWxBorrowKey(String key) {
        return RedisCommonLock.getLockKey("wx_borrow_lock_", key + "");
    }

    /**
     * 微信支付 - 统一下单
     *
     * @param key
     * @return
     */
    public static String getWxPayRechargeKey(String key) {
        return RedisCommonLock.getLockKey("wx_pay_recharge_lock_", key + "");
    }


    /**
     * 支付宝支付 - 统一下单
     *
     * @param key
     * @return
     */
    public static String getAliPayRechargeKey(String key) {
        return RedisCommonLock.getLockKey("ali_pay_recharge_lock_", key + "");
    }


    /**
     * 微信退押
     *
     * @param key
     * @return
     */
    public static String getWxRefundDepositKey(String key) {
        return RedisCommonLock.getLockKey("wx_refund_deposit_lock_", key + "");
    }


    /**
     * 支付宝退押
     *
     * @param key
     * @return
     */
    public static String getAliRefundDepositKey(String key) {
        return RedisCommonLock.getLockKey("ali_refund_deposit_lock_", key + "");
    }
}
